const Router = require('koa-router')

const {
  create,
  avatarInfo
} = require('../controller/user_controller')

const {
  verifyUser,
  handlePassword
} = require('../middleware/user_middleware')

const userRouter = new Router({prefix:'/users'}) 

// 注册
userRouter.post('/', verifyUser, handlePassword, create )
userRouter.get('/:userId/avatar',avatarInfo)

module.exports = userRouter